cpu/speculation: Uninline and export CPU mitigations helpers
authorTyler Hicks <tyhicks@canonical.com>
Mon, 4 Nov 2019 11:22:02 +0000 (12:22 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 19 Nov 2019 01:43:33 +0000 (01:43 +0000)
commit4647717da454afcfd5ebc61fc06572f3ca6e0b01
tree242fa26df850328b4b0ea0f20f6ae71bc77a3ca3
parent3a69c081c09a81d5e54c5e3c73e9890367411c2a
cpu/speculation: Uninline and export CPU mitigations helpers

A kernel module may need to check the value of the "mitigations=" kernel
command line parameter as part of its setup when the module needs
to perform software mitigations for a CPU flaw.

Uninline and export the helper functions surrounding the cpu_mitigations
enum to allow for their usage from a module.

Lastly, privatize the enum and cpu_mitigations variable since the value of
cpu_mitigations can be checked with the exported helper functions.

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Gbp-Pq: Topic bugfix/x86/itlb_multihit
Gbp-Pq: Name 0003-cpu-speculation-Uninline-and-export-CPU-mitigations-.patch
include/linux/cpu.h
kernel/cpu.c